<?php
$this->breadcrumbs = array(
	'材料列表' => array(
		'material/index'
	),
	$model->material->name => array(
		'material/view',
		'id' => $model->materialId
	),
	'型号列表' => array(
		'index',
		'materialId' => $model->materialId
	),
	$model->model,
);

$this->userActions = array(
	//array('label'=>'List MaterialModel', 'url'=>array('index')),
	array(
		'label' => '新建型号',
		'url' => array(
			'create',
			'materialId' => $model->materialId
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-brick-add'
	),
	array(
		'label' => '更新型号 ' . $model->model,
		'url' => array(
			'update',
			'id' => $model->id
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-brick-edit'
	),
	array(
		'label' => '删除型号 ' . $model->model,
		'url' => '#',
		'linkOptions' => array(
			'submit' => array(
				'delete',
				'id' => $model->id
			),
			'confirm' => '是否删除型号 ' . $model->model . '？',
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-brick-delete'
	),
	array(
		'label' => '管理型号',
		'url' => array(
			'admin'
		),
		'visible' => Yii::app()->user->checkAccess('materialManage'),
		'iconClass' => 'icon-brick'
	),
);
?>

<h1>View MaterialModel #<?php echo $model->id; ?></h1>
<?php $this
	->widget('zii.widgets.CDetailView',
		array(
			'data' => $model,
			'attributes' => array(
				'id',
				'materialId',
				'model',
				'code',
				'unit',
				'referenceCode',
				'note',
			),
		));
?>
